<template>
  <!-- 表单 -->
  <div class="form">
    <el-form :model="ruleform" :ref="ruleform">
      <div class="formline">
        <div class="name">
          <p>名字*</p>
          <el-form-item>
            <el-input v-model="ruleform.name" />
          </el-form-item>
        </div>

        <div class="name">
          <p>电子邮件*</p>
          <el-form-item>
            <el-input v-model="ruleform.email" />
          </el-form-item>
        </div>

        <div class="name">
          <p>网站*</p>
          <el-form-item>
            <el-input v-model="ruleform.web" />
          </el-form-item>
        </div>
      </div>
      <div class="formline">
        <div class="name">
          <p>组织</p>
          <el-form-item>
            <el-input v-model="ruleform.name" />
          </el-form-item>
        </div>

        <div class="name">
          <p>位置</p>
          <el-form-item>
            <el-input v-model="ruleform.email" />
          </el-form-item>
        </div>

        <div class="name">
          <p>国家</p>
          <el-form-item>
            <el-input v-model="ruleform.web" />
          </el-form-item>
        </div>
      </div>
      <div class="textarea">
        <p>消息</p>
        <el-form-item>
          <el-input type="textarea" v-model="ruleform.textarea" />
        </el-form-item>
      </div>
      <el-form-item>
        <el-button type="primary" class="submit">发表评论</el-button>
      </el-form-item>
    </el-form>
  </div>
  <!-- 表单 -->
</template>

<script>
export default {
  data() {
    return {
      ruleform: {
        name: "",
        email: "",
        web: "",
        textarea: "",
      },
    };
  },
};
</script>

<style>
.form {
  margin-top: 30px;
  color: #858787;
}
.formline {
  display: flex;
  justify-content: space-between;
}
.name {
  width: 30%;
}
.textarea {
  margin-top: 40px;
  width: 100%;
}
.submit{
  margin-top: 40px;
  padding: 20px 35px;
  border-radius: 20px;
}
@media screen and (max-width:768px) {
  .formline{
    display: block;
  }
  .name{
    width: 100%;
  }
}
</style>

